package lab02.Test04;

import static java.lang.System.*;

public class Staff {
    //1.属性：员工姓名、员工号码、员工基本薪水、员工薪水增长额
    private String name;
    private String num;
    private double salary;
    private double increase;
    //2.行为：构造方法、获取员工姓名、获取员工号码、获取员工基本薪水、计算薪水增长额及计算增长后的工资总额。

    public Staff() {

    }

    public Staff(String name, String num, double salary, double increase) {
        this.increase = increase;
        this.name = name;
        this.num = num;
        this.salary = salary;

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public double getIncrease() {
        return increase;
    }

    public void setIncrease(double increase) {
        this.increase = increase;
    }

    public static void main(String[] args) {
        Staff sc = new Staff("张三", "123456", 5000, 1000);
        System.out.println(sc.getName());
        System.out.println(sc.getNum());
        System.out.println(sc.getSalary());
        System.out.println(sc.getIncrease());

        System.out.println((sc.getSalary() + sc.getIncrease()));
    }
}




